package com.o2o.dao;

import com.o2o.entity.Shop;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * package_name:com.o2o.dao
 * Author:徐亚远
 * Date:2019/11/27 21:26
 * 项目名:o2o
 * Desription:
 **/
public interface ShopDao {
    /*
     *分页查询店铺,可输入的条件为:店铺名称(模糊),
     * 店铺状态,店铺类别,区域Id,owner
     * @param shopCondition
     * @param rowIndex 从第几行开始取数据
     * @param pageSize 返回几行数据
     * @return
     * */
    List<Shop> queryShopList(@Param("shopCondition") Shop shopCondition,
                             @Param("rowIndex") int rowIndex,
                             @Param("pageSize") int pageSize);
    /*
    * @param shopCondition
    * @return
    * 查询种数
    * */
    int queryShopCount(@Param("shopCondition") Shop shopCondition);
    /*
     * @param shopId
     * 通过shopId修改店铺信息
     * */
    Shop queryShopId(Long shopId);

    /*
     * @param Shop
     * @return
     * 新增店铺
     * */
    int insertShop(Shop shop);

    /*
     *  @param Shop
     *  @retuen
     *  更新店铺
     * */
    int updateShop(Shop shop);

    /*
     * @param shop_id
     * @return
     * */
    int deleteShop(Long shop_id);
}
